package com.health.healthproject.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.health.healthproject.dto.ServiceRecordDTO;
import com.health.healthproject.entity.ServiceRecord;

public interface ServiceRecordService extends IService<ServiceRecord> {

    /**
     * 根据ID获取服务记录（包含创建人和更新人用户名）
     */
    ServiceRecordDTO getServiceRecordWithUserNames(Long id);

    /**
     * 分页查询服务记录（包含创建人和更新人用户名）
     */
    // IPage<ServiceRecordDTO> pageServiceRecordWithUserNames(Integer pageNum, Integer pageSize, ServiceRecord query);

    /**
     * 新增服务记录
     */
    boolean createServiceRecord(ServiceRecord serviceRecord);

    /**
     * 更新服务记录
     */
    boolean updateServiceRecord(ServiceRecord serviceRecord);

    /**
     * 删除服务记录
     */
    boolean deleteServiceRecord(Long id);

    Page<ServiceRecordDTO> pageServiceRecord(Page<ServiceRecordDTO> page, ServiceRecord query,String startDate,String endDate);
}